-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre commit python #11004
Pre commit python #11004
Conversation
@JoergAtGithub does this work for you on windows? |
All cheks make Pass on Windows with this PR, but it seems, that clang-format doesn't detect or correct anything. |
Did you to artificially introduce a formatting issue?
I also noticed that since |
After signifiantly destroying the formatting of a .cpp file I get this:
and the .cpp file is commited unmodified. |
5d4b5a2
to
006f24a
Compare
How did you run pre-commit? |
Ah, it was a separator issue with / and |
This fixes AttributeError: 'EntryPoints' object has no attribute 'get' after importlib-metadata update
This fixes AttributeError: 'EntryPoints' object has no attribute 'get' after importlib-metadata update
cccb296
to
6b5bf8d
Compare
I have added some other couple of windows fixes. I think you can now use pre-commit on windows. |
Now it works for me! |
Cool, thank you. Can you also confirm that pre-commit works now without disabling any check? |
Yes, nothing is disbabled! |
Thank you for confirming. Who can press merge? |
This still fails on Ubuntu 22.04 but that version of python is known broken:
using python 3.11, which has been my workaround, this works fine still |
Ok, it looks like the pre-commit issue is tracked here: The workaround using the python3.11 package has been confirmed or the patched python3.10 found here: This is the Ubuntu bug: |
I have updated the wiki accordingly: |
Ready for merge! |
Since no one familiar wit pre-commit finds time to take a look, I'll press merge now to move forward. Regressions we be fixed. |
It turns out the "language: python" are working only by luck.
A python hook requires a python entry. That ensures that the same python version is used and not another one found at the path.
Our use case of starting a system script is covered by "language: system"
This also pins the clang-format version and gets around the clang-format not found issue.